using Assets.Scripts.Map.Room;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyBase : MonoBehaviour
{
    public EnemyAttributeData data;
    public EnemyControllerBase controller;
    public EnemyAnimatorControllerBase animatorController;
    public EnemyHealthControllerBase healthController;
    public BaseRoom curRoom;

    public virtual void Awake()
    {
        data = data.GetClone() as EnemyAttributeData;
        controller = GetComponent<EnemyControllerBase>();
        animatorController = GetComponent<EnemyAnimatorControllerBase>();
        healthController = GetComponent<EnemyHealthControllerBase>();
    }
    public virtual void Update()
    {
        controller.OnUpdate();
    }

    private void OnDrawGizmos()
    {
        if(data != null && data.isDebug)
        {
            Gizmos.color = Color.yellow;
            Gizmos.DrawWireSphere(transform.position, data.AttackRangeRadius);
            Gizmos.color = Color.red;
            Gizmos.DrawWireSphere(transform.position, data.PursuitRangeRadius);
        }
    }
}
